package com.wxy;

import java.util.ArrayList;
import java.util.List;

import java.util.concurrent.TimeUnit;

import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.StringRedisTemplate;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wxy.dao.userMapper;
import com.wxy.domain.User;
import com.wxy.service.jwtServiceConfig;
import com.wxy.service.userService;

import cn.hutool.json.JSONUtil;

@SpringBootTest
public class junitTest1 {
	private static final Logger LOGGER=LoggerFactory.getLogger(junitTest1.class);
	@Autowired
	private userService userService;
	@Autowired
	private userMapper userMapper;
	//@Test
	public void test() {
		String string=jwtServiceConfig.getToken(1);
		LOGGER.info(string);
	}
	//@Test
	public void test2() {
		QueryWrapper<User> queryWrapper=new QueryWrapper<User>().eq("id",2);
		List<User> user2=userMapper.selectList(queryWrapper);
		for (User user : user2) {
			System.out.println(user);
		}
	}
	@Test
	public void test3() {
		List<Integer> list=new ArrayList<Integer>();
		list.add(1);
		list.add(2);
		List<User> users=userMapper.selectByIds(list);
		for (User user : users) {
			System.out.println(user.toString());
		}
	}
}
